﻿<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" CodeBehind="PartyNotificationAnnouncementEdit.aspx.cs" Inherits="SysManage.Module.NotificationAnnouncement.PartyNotificationAnnouncementEdit" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title></title>
    <script src="../../../../Resource/ueditor/ueditor.config.js"></script>
    <script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
    <script src="../../../../Scripts/jquery.min.js"></script>
    <link href="../../../../Resource/js/uploadify.css" rel="stylesheet" />
    <script src="../../../../Resource/js/jquery.uploadify.js"></script>
    <script type="text/javascript">
        $(function () {
            var filePath = '';
            var fileID = '';
            $("#uploadify").uploadify({
                //指定swf文件
                'swf': '../../../../Resource/js/uploadify.swf',
                //后台处理的页面
                'uploader': '../Article/uploadfile.ashx',
                //按钮显示的文字
                'buttonText': '浏　览',
                //上传文件的类型  默认为所有文件    'All Files'  ;  '*.*'
                //在浏览窗口底部的文件类型下拉菜单中显示的文本
                'fileTypeDesc': 'Image Files',
                //允许上传的文件后缀
                //'fileTypeExts': '*.gif; *.jpg; *.png;*.zip',
                //发送给后台的其他参数通过formData指定
                //'formData': { 'someKey': 'someValue', 'someOtherKey': 1 },
                //上传文件页面中，你想要用来作为文件队列的元素的id, 默认为false  自动生成,  不带#
                //'queueID': 'fileQueue',
                'fileSizeLimit': 204800000,
                //选择文件后自动上传
                'auto': false,
                //设置为true将允许多文件上传
                'multi': true,
                //上传成功
                'onUploadSuccess': function (file, data, response) {
                    var obj = (new Function("return " + data))();//【json字符串转为json对象。】
                    $("#rep").append("<span>" + obj.Msg + "!</span>");//data为后台返回结果。
                    filePath += obj.FileTitle;
                    fileID += obj.Id;
                    $("#Panel1_SimpleForm1_PanelFile_txtFileID").val(fileID);
                    $("#Panel1_SimpleForm1_PanelFile_txtFilePath").val(filePath);
                }
            });
        });
    </script>
</head>
<body>
    <form id="form1" runat="server" style="background-color: #0000FF">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server">
            <Items>
                <f:SimpleForm ID="SimpleForm1" ShowBorder="false" ShowHeader="false" runat="server"
                    BodyPadding="10px" Title="SimpleForm">
                    <Items>
                        <f:TextArea ID="txtTitle" runat="server" Label="公告标题" Required="true" ShowRedStar="true" RequiredMessage="请填写公告标题">
                        </f:TextArea>

                        <f:ContentPanel ShowBorder="false" ShowHeader="false" AutoScroll="true" ID="PanelFile" CssClass="header"
                            runat="server">
                            <div>
                                <div id="fileQueue">
                                </div>
                                <input type="file" name="uploadify" id="uploadify" />
                                <p>
                                    <a href="javascript:$('#uploadify').uploadify('upload','*')">上传</a>| 
                                    <a href="javascript:$('#uploadify').uploadify('cancel','*')">取消上传</a>
                                </p>
                            </div>
                            <br />
                            <div id="rep">返回的结果：</div>
                            <div>
                                <input id="txtFileID" type="hidden" runat="server" value="" />
                                <textarea id="txtFilePath" runat="server" style="width: 100%"></textarea>
                            </div>
                        </f:ContentPanel>

                        <f:HtmlEditor ID="heContent" runat="server" Label="公告内容" Height="260px"></f:HtmlEditor>
                    </Items>
                </f:SimpleForm>
            </Items>
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose"
                            OnClick="btnSaveClose_Click" runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
                        </f:ToolbarSeparator>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭" DisableControlBeforePostBack="True">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
        </f:Panel>
    </form>
</body>
</html>
